<?php
// mongodb://<user>:<password>@alex.mongohq.com:10036/wbench
echo "Antes de crear nada . <br / >";
$mongo = new Mongo("mongodb://alartigue:123@alex.mongohq.com:10036/wbench");
echo "Estoy conectado . <br / >";
$db = $mongo->selectDB('wbench');
echo "Antes de insertar autores. <br / >";

$authors = $db->authors;
$author = array(
    'first_name'=>'Carlos',
    'last_name' =>'Tevez',
    'website'=>'http://www.tevez.comt',
    'age'=>31
);
$author_id = $authors->insert($author);

echo "Nuevo autor = $author_id";